<?php


namespace App\Services;


use phpDocumentor\Reflection\Types\Self_;

class BaseServices
{
    private static $obj = [];

    /**
     * @return static
     */
    public static function getInstance()
    {
        if (!isset(self::$obj[static::class]) || !self::$obj[static::class] instanceof static) {
            self::$obj[static::class] = new static();
        }
        return self::$obj[static::class];
    }

    private function __construct()
    {
    }
    private function __clone()
    {
    }
}
